import{d as C,l as z,a as m,o as i,c as u,m as l,e as s,w as t,q as o,t as n,f as e,F as O,H as x,$ as B,a0 as P,K as R,b as _,p as g,Y as c,W as k,_ as V,a2 as K}from"./index-c80Lh_is.js";import{S as N}from"./StatusBadge-UNqSn95Q.js";import{T as b}from"./TagList-Rh-3ygnt.js";const S={class:"stack"},$={class:"stack-with-borders"},I={class:"status-with-reason"},L={key:0},A={class:"mt-4"},E={class:"stack-with-borders"},U={class:"mt-4 stack"},F={class:"mt-2 stack-with-borders"},W=C({__name:"DataPlaneSummary",props:{dataplaneOverview:{}},setup(h){const{t:a}=z(),r=h;return(D,f)=>{const w=m("KTooltip"),y=m("DataCollection"),v=m("KBadge");return i(),u("div",S,[l("div",$,[s(c,{layout:"horizontal"},{title:t(()=>[e(n(o(a)("http.api.property.status")),1)]),body:t(()=>[l("div",I,[s(N,{status:r.dataplaneOverview.status},null,8,["status"]),e(),r.dataplaneOverview.dataplane.networking.type==="standard"?(i(),_(y,{key:0,items:r.dataplaneOverview.dataplane.networking.inbounds,predicate:p=>!p.health.ready,empty:!1},{default:t(({items:p})=>[s(w,{class:"reason-tooltip",placement:"bottomEnd"},{content:t(()=>[l("ul",null,[(i(!0),u(O,null,x(p,d=>(i(),u("li",{key:`${d.service}:${d.port}`},n(o(a)("data-planes.routes.item.unhealthy_inbound",{service:d.service,port:d.port})),1))),128))])]),default:t(()=>[s(o(B),{color:o(P),size:o(R),"hide-title":""},null,8,["color","size"]),e()]),_:2},1024)]),_:1},8,["items","predicate"])):g("",!0)])]),_:1}),e(),s(c,{layout:"horizontal"},{title:t(()=>[e(n(o(a)("data-planes.routes.item.last_updated")),1)]),body:t(()=>[e(n(o(a)("common.formats.datetime",{value:Date.parse(r.dataplaneOverview.modificationTime)})),1)]),_:1})]),e(),r.dataplaneOverview.dataplane.networking.gateway?(i(),u("div",L,[l("h3",null,n(o(a)("data-planes.routes.item.gateway")),1),e(),l("div",A,[l("div",E,[s(c,{layout:"horizontal"},{title:t(()=>[e(n(o(a)("http.api.property.tags")),1)]),body:t(()=>[s(b,{alignment:"right",tags:r.dataplaneOverview.dataplane.networking.gateway.tags},null,8,["tags"])]),_:1}),e(),s(c,{layout:"horizontal"},{title:t(()=>[e(n(o(a)("http.api.property.address")),1)]),body:t(()=>[s(k,{text:`${r.dataplaneOverview.dataplane.networking.address}`},null,8,["text"])]),_:1})])])])):g("",!0),e(),r.dataplaneOverview.dataplane.networking.type==="standard"?(i(),_(y,{key:1,items:r.dataplaneOverview.dataplane.networking.inbounds},{default:t(({items:p})=>[l("div",null,[l("h3",null,n(o(a)("data-planes.routes.item.inbounds")),1),e(),l("div",U,[(i(!0),u(O,null,x(p,(d,T)=>(i(),u("div",{key:T,class:"inbound"},[l("h4",null,[s(k,{text:d.tags["kuma.io/service"]},{default:t(()=>[e(n(o(a)("data-planes.routes.item.inbound_name",{service:d.tags["kuma.io/service"]})),1)]),_:2},1032,["text"])]),e(),l("div",F,[s(c,{layout:"horizontal"},{title:t(()=>[e(n(o(a)("http.api.property.status")),1)]),body:t(()=>[d.health.ready?(i(),_(v,{key:0,appearance:"success"},{default:t(()=>[e(n(o(a)("data-planes.routes.item.health.ready")),1)]),_:1})):(i(),_(v,{key:1,appearance:"danger"},{default:t(()=>[e(n(o(a)("data-planes.routes.item.health.not_ready")),1)]),_:1}))]),_:2},1024),e(),s(c,{layout:"horizontal"},{title:t(()=>[e(n(o(a)("http.api.property.tags")),1)]),body:t(()=>[s(b,{alignment:"right",tags:d.tags},null,8,["tags"])]),_:2},1024),e(),s(c,{layout:"horizontal"},{title:t(()=>[e(n(o(a)("http.api.property.address")),1)]),body:t(()=>[s(k,{text:d.addressPort},null,8,["text"])]),_:2},1024)])]))),128))])])]),_:1},8,["items"])):g("",!0)])}}}),q=V(W,[["__scopeId","data-v-e495fb90"]]),G={key:1,class:"stack"},j=C({__name:"DataPlaneSummaryView",props:{name:{},dataplaneOverview:{default:void 0}},setup(h){const a=h;return(r,D)=>{const f=m("RouteTitle"),w=m("RouterLink"),y=m("AppView"),v=m("RouteView");return i(),_(v,{name:"data-plane-summary-view"},{default:t(({t:p})=>[s(y,null,{title:t(()=>[l("h2",null,[s(w,{to:{name:"data-plane-detail-view",params:{dataPlane:a.name}}},{default:t(()=>[s(f,{title:p("data-planes.routes.item.title",{name:a.name})},null,8,["title"])]),_:2},1032,["to"])])]),default:t(()=>[e(),a.dataplaneOverview===void 0?(i(),_(K,{key:0},{message:t(()=>[l("p",null,n(p("common.collection.summary.empty_message",{type:"Data Plane Proxy"})),1)]),default:t(()=>[e(n(p("common.collection.summary.empty_title",{type:"Data Plane Proxy"}))+" ",1)]),_:2},1024)):(i(),u("div",G,[s(q,{class:"mt-4","dataplane-overview":a.dataplaneOverview},null,8,["dataplane-overview"])]))]),_:2},1024)]),_:1})}}});export{j as default};
